const mongoose = require('mongoose')
const schema = new mongoose.Schema({
    //某一个访客对某一类型的某个数据做了某个操作
    //访客1 对文章id为xxx的做了点赞操作
    visitor_id: { type: mongoose.SchemaTypes.ObjectId, ref: 'Visitor' },
    type: { type: String },
    object: { type: mongoose.SchemaTypes.ObjectId, ref: 'Article' },
    name: String
})

module.exports = mongoose.model('Action', schema);